import { UserHobby } from '@/enum';
import { IsEnum, IsNotEmpty } from 'class-validator';

export default class CreateScenicDto {
  @IsNotEmpty()
  spot: string;

  @IsNotEmpty()
  addr: string;

  @IsNotEmpty()
  desc: string;

  @IsNotEmpty()
  detail: string;

  @IsNotEmpty()
  imgs: string[];

  @IsEnum(UserHobby, {
    message: '类型必须是  0:休闲 1:人文 2:现代 3:自然',
  })
  type: number;

  url: string;
  tel: string;
  open_time: string;
  visit_time: string;
}
